package main

import (
	"blogx_server/core"
	"blogx_server/flags"
	"blogx_server/global"
	"blogx_server/service/redis_service/redis_jwt"
	"fmt"
)

func main() {
	flags.Parse()
	global.Config = core.ReadConf()
	core.InitLogrus()
	global.DB = core.InitDB()
	global.Redis = core.InitRedis()
	//
	//token, err := jwts.GetToken(jwts.Claims{
	//	UserID:   1,
	//	Username: "sam",
	//	Role:     1,
	//})
	//fmt.Println(token, err, "111")
	token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySUQiOjExLCJ1c2VybmFtZSI6InNhbSIsInJvbGUiOjEsImV4cCI6MTczNTE1NDAxOCwiaXNzIjoiamllZ2UifQ.w9OkoeAoXsoDdsHiRTP9BiXzZFPR-jzN0AZVWkSwHG0"
	redis_jwt.TokenBlack(token, redis_jwt.UserBlackType)
	blk, ok := redis_jwt.HasTokenBlack(token)
	fmt.Println(blk, ok, "111")
}
